package com.huluobo.a2109monthdemo2.home

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2109monthdemo2.R
import com.huluobo.a2109monthdemo2.utils.ImageUtils

/**
 *  Created by LC on 2024/2/18.
 */
class HomeNavAdapter(list: MutableList<HomeNavBean>) :
    BaseQuickAdapter<HomeNavBean, BaseViewHolder>(R.layout.item_home_nav, list) {
    override fun convert(helper: BaseViewHolder, item: HomeNavBean) {
        helper.setText(R.id.item_home_nav_tv, item.category_name)
        if (item.category_icon != null) {
            ImageUtils.loadImage(context, item.category_icon, helper.getView(R.id.item_home_nav_iv))
        }
    }
}